package com.srlg.liteflow.controller;

import com.srlg.liteflow.model.dto.User;
import com.srlg.liteflow.remote.RemoteService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * remote 控制器
 */
@RestController
@RequestMapping("/remote")
@RequiredArgsConstructor
public class RemoteController {

    private final RemoteService remoteService;

    /**
     *  查询
     * @param id
     * @return
     */
    @GetMapping("query/{id}")
    public ResponseEntity<User> query(@PathVariable Long id) {
        return remoteService.query(id);
    }
}
